import service from '@/utils/request'

// @Tags Tails
// @Summary 创建Tails
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Tails true "创建Tails"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /tails/createTails [post]
export const createTails = (data) => {
     return service({
         url: "/tails/createTails",
         method: 'post',
         data
     })
 }


// @Tags Tails
// @Summary 删除Tails
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Tails true "删除Tails"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /tails/deleteTails [delete]
 export const deleteTails = (data) => {
     return service({
         url: "/tails/deleteTails",
         method: 'delete',
         data
     })
 }

// @Tags Tails
// @Summary 删除Tails
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Tails"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /tails/deleteTails [delete]
 export const deleteTailsByIds = (data) => {
     return service({
         url: "/tails/deleteTailsByIds",
         method: 'delete',
         data
     })
 }

// @Tags Tails
// @Summary 更新Tails
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Tails true "更新Tails"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /tails/updateTails [put]
 export const updateTails = (data) => {
     return service({
         url: "/tails/updateTails",
         method: 'put',
         data
     })
 }


// @Tags Tails
// @Summary 用id查询Tails
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Tails true "用id查询Tails"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /tails/findTails [get]
 export const findTails = (params) => {
     return service({
         url: "/tails/findTails",
         method: 'get',
         params
     })
 }


// @Tags Tails
// @Summary 分页获取Tails列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.PageInfo true "分页获取Tails列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /tails/getTailsList [get]
 export const getTailsList = (params) => {
     return service({
         url: "/tails/getTailsList",
         method: 'get',
         params
     })
 }

 // 根据LineId查询数据列表
 export const getTailsListByLineId = (params) => {
     return service({
         url: "/tails/getTailsListByLineId",
         method: 'get',
         params
     })
 }

 // 根据LineId的最大创建时间查询最新记录
 export const getTailsByMaxCreateTimeWhereLineId = (params) => {
     return service({
         url: "/tails/getTailsByMaxCreateTimeWhereLineId",
         method: 'get',
         params
     })
 }
